//package com.apcc4m.sfpushbatch.processor;
//
//import java.util.List;
//
//import org.springframework.batch.item.ItemProcessor;
//import org.springframework.beans.factory.annotation.Autowired;
//
//import com.apcc4m.sfpushbatch.common.BatchResult;
//import com.apcc4m.sfpushbatch.repository.Notification;
//import com.apcc4m.sfpushbatch.repository.NotificationRepository;
//import com.apcc4m.sfpushbatch.repository.PushStatus;
//import com.apcc4m.sfpushbatch.repository.PushStatusRepository;
//
//public class NotificationItemProcessor implements ItemProcessor<Notification, Notification>{
//
//    @Autowired
//    private NotificationRepository notificationRepository;
//    @Autowired
//    private PushStatusRepository pushStatusRepository;
//    /**
//     * 处理从Reader中读取的数据，返回Result供Writer使用，可以使业务之间分层
//     */
//    @Override
//    public Notification process(Notification notification) throws Exception {
////        notification.setStatus(1);
////        notificationRepository.save(notification);
//        
////        //这里的数据量是根据用户数量决定的
////        //将所有android用户查出来
////        List<PushStatus> androidPushStatusList = pushStatusRepository.findByNIdAndUserType(notification.getId(),1);
////        for(PushStatus item:androidPushStatusList){
////            
////        }
////        
////        //将所有iOS用户查出来
////        List<PushStatus> iOSPushStatusList = pushStatusRepository.findByNIdAndUserType(notification.getId(),2);
////        for(PushStatus item:iOSPushStatusList){
////            
////        }
//        
//        System.out.println("Start process called ");
//        Notification result = new Notification();
////        result.setArgs("bbb");
//        return result;
//    }
//
//}
